package net.siufung.market.base.permit.controller.model.vo;

import cn.hutool.core.lang.tree.TreeNode;
import io.swagger.annotations.ApiModel;
import lombok.Data;
import lombok.EqualsAndHashCode;

/**
 * @author 陈建峰
 * @since 2021/11/12 1:29 下午
 */
@Data
@EqualsAndHashCode(callSuper = true)
@ApiModel("MenuTreeNode")
public class MenuTreeNode extends TreeNode<Integer> {

	private static final long serialVersionUID = -4662187650050835664L;
	/**
	 * icon
	 */
	private String icon;
	
	/**
	 * code 菜单编码
	 */
	private String code;
	
	/**
	 * router 访问路由
	 */
	private String router;

	/**
	 * router 访问路由
	 */
	private String fullPath;

	/**
	 * 组件
	 */
	private String component;

	/**
	 * 权限
	 */
	private String authority;

	/**
	 * 缓存
	 */
	private Boolean keepAlive;
	
	/**
	 * type
	 */
	private String type;
	
	/**
	 * label
	 */
	private String label;
	
	/**
	 * level
	 */
	private Integer level;

	/**
	 * 是否显示
	 */
	private boolean visible;
	
	
	public MenuTreeNode(Integer id, Integer parentId,
                        String name, Integer weight, String code,
                        String icon, String router, String fullPath, String component,
                        String authority, Boolean keepAlive, String type,
                        Integer level, boolean visible) {
		super(id,parentId,name,weight);
		this.code = code;
		this.icon = icon;
		this.router = router;
		this.fullPath = fullPath;
		this.component = component;
		this.authority = authority;
		this.keepAlive = keepAlive;
		this.type = type;
		this.level = level;
		this.visible = visible;
	}

	public MenuTreeNode(Integer id, Integer parentId,
						String name, Integer weight, String code,
						String icon, String router, String component,
						String authority, Boolean keepAlive, String type,
						Integer level, boolean visible) {
		super(id,parentId,name,weight);
		this.code = code;
		this.icon = icon;
		this.router = router;
		this.component = component;
		this.authority = authority;
		this.keepAlive = keepAlive;
		this.type = type;
		this.level = level;
		this.visible = visible;
	}

}
